<?php
class Question extends AppModel {
	var $name = 'Question';
	
	var $hasAndBelongsToMany = array(
        'Survey' =>
            array(
	            'className'              => 'Survey',
	            'joinTable'              => 'questions_surveys',
	            'foreignKey'             => 'question_id',
                'associationForeignKey'  => 'survey_id',
                'unique'                 => true,
                'conditions'             => '',
                'fields'                 => '',
                'order'                  => '',
                'limit'                  => '',
                'offset'                 => '',
                'finderQuery'            => '',
                'deleteQuery'            => '',
                'insertQuery'            => ''
            )
	);
	
	var $hasMany = 'Answer';
	
	var $validate = array(
		'text' => array(
			'rule' => 'notEmpty',
			'message' => 'Please enter a question name'
		)
	);
}
?>